/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { JsonToSqlBo } from '../models/JsonToSqlBo';
import type { RJsonDataResultDTO } from '../models/RJsonDataResultDTO';

import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';

export class JsonFileConvertControllerService {

    /**
     * @param formData
     * @returns RJsonDataResultDTO OK
     * @throws ApiError
     */
    public static getFieldName(
        formData?: {
            file: Blob;
        },
    ): CancelablePromise<RJsonDataResultDTO> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/tools/json/getFieldName',
            formData: formData,
            mediaType: 'multipart/form-data',
        });
    }

    /**
     * @param formData
     * @returns any OK
     * @throws ApiError
     */
    public static jsonToSql(
        formData?: {
            file: Blob;
            data: JsonToSqlBo;
        },
    ): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/tools/json/convert',
            formData: formData,
            mediaType: 'multipart/form-data',
        });
    }

    /**
     * @param formData
     * @returns binary OK
     * @throws ApiError
     */
    public static convertToTrue(
        formData?: {
            file: Blob;
        },
    ): CancelablePromise<Blob> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/api/1.0/tools/json/convertToTrue',
            formData: formData,
            mediaType: 'multipart/form-data',
        });
    }

}
